package com.mifengkong.cygtools.model;

import com.mifengkong.cygtools.jjcard.CardMainBean;
import com.mifengkong.cygtools.jjcard.HttpFunctionForCard;

import io.reactivex.Observable;
import io.reactivex.Observer;

/**
 * Created by jiangyongxing on 2017/12/28.
 * 描述：首页和我的页面获取Card数据
 */

public class GetCardDataModel extends BaseJJCardModel {

    public static GetCardDataModel getInstance() {
        return getPresent(GetCardDataModel.class);
    }

    public void execute(Observer<CardMainBean> observer) {
        Observable observable = mServletApi.getCardsData().map(new HttpFunctionForCard());
        toSubscribe(observable, observer);
    }

}
